json.array! @messages, :id, :user_id, :group_id, :text, :created_at, :updated_at
